curl --request PUT \
--url https://{base_url_domain}/api/global/v1/inventory/product-profiles/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Lightweight Parcel Products",
"conditions": {
"or": [
{
"and": [
{
"<=": [
{
"var": "weight"
},
{
"value": 15,
"unit": "lb"
}
]
}
]
}
]
}
}
'import requests
url = "https://{base_url_domain}/api/global/v1/inventory/product-profiles/{id}"
payload = {
"name": "Lightweight Parcel Products",
"conditions": { "or": [{ "and": [{ "<=": [
{ "var": "weight" },
{
"value": 15,
"unit": "lb"
}
] }] }] }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Lightweight Parcel Products',
conditions: {or: [{and: [{'<=': [{var: 'weight'}, {value: 15, unit: 'lb'}]}]}]}
})
};
fetch('https://{base_url_domain}/api/global/v1/inventory/product-profiles/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{base_url_domain}/api/global/v1/inventory/product-profiles/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Lightweight Parcel Products',
'conditions' => [
'or' => [
[
'and' => [
[
'<=' => [
[
'var' => 'weight'
],
[
'value' => 15,
'unit' => 'lb'
]
]
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{base_url_domain}/api/global/v1/inventory/product-profiles/{id}"
payload := strings.NewReader("{\n \"name\": \"Lightweight Parcel Products\",\n \"conditions\": {\n \"or\": [\n {\n \"and\": [\n {\n \"<=\": [\n {\n \"var\": \"weight\"\n },\n {\n \"value\": 15,\n \"unit\": \"lb\"\n }\n ]\n }\n ]\n }\n ]\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://{base_url_domain}/api/global/v1/inventory/product-profiles/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Lightweight Parcel Products\",\n \"conditions\": {\n \"or\": [\n {\n \"and\": [\n {\n \"<=\": [\n {\n \"var\": \"weight\"\n },\n {\n \"value\": 15,\n \"unit\": \"lb\"\n }\n ]\n }\n ]\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{base_url_domain}/api/global/v1/inventory/product-profiles/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Lightweight Parcel Products\",\n \"conditions\": {\n \"or\": [\n {\n \"and\": [\n {\n \"<=\": [\n {\n \"var\": \"weight\"\n },\n {\n \"value\": 15,\n \"unit\": \"lb\"\n }\n ]\n }\n ]\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"errors": [
{
"type": "parameters",
"message": "The supplied parameters are invalid."
}
]
}{
"errors": [
{
"type": "not_found",
"message": "The server could not find the requested resource."
}
]
}{
"errors": [
{
"type": "unable_to_process",
"message": "Unknown condition field \"unknown_field\"."
}
]
}Update Product Profile
Partially updates a Product Profile. code is immutable and is not accepted. A conditions
change schedules asynchronous reclassification after commit.
On success, the endpoint returns 200 OK with an empty response body.
curl --request PUT \
--url https://{base_url_domain}/api/global/v1/inventory/product-profiles/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Lightweight Parcel Products",
"conditions": {
"or": [
{
"and": [
{
"<=": [
{
"var": "weight"
},
{
"value": 15,
"unit": "lb"
}
]
}
]
}
]
}
}
'import requests
url = "https://{base_url_domain}/api/global/v1/inventory/product-profiles/{id}"
payload = {
"name": "Lightweight Parcel Products",
"conditions": { "or": [{ "and": [{ "<=": [
{ "var": "weight" },
{
"value": 15,
"unit": "lb"
}
] }] }] }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Lightweight Parcel Products',
conditions: {or: [{and: [{'<=': [{var: 'weight'}, {value: 15, unit: 'lb'}]}]}]}
})
};
fetch('https://{base_url_domain}/api/global/v1/inventory/product-profiles/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{base_url_domain}/api/global/v1/inventory/product-profiles/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Lightweight Parcel Products',
'conditions' => [
'or' => [
[
'and' => [
[
'<=' => [
[
'var' => 'weight'
],
[
'value' => 15,
'unit' => 'lb'
]
]
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{base_url_domain}/api/global/v1/inventory/product-profiles/{id}"
payload := strings.NewReader("{\n \"name\": \"Lightweight Parcel Products\",\n \"conditions\": {\n \"or\": [\n {\n \"and\": [\n {\n \"<=\": [\n {\n \"var\": \"weight\"\n },\n {\n \"value\": 15,\n \"unit\": \"lb\"\n }\n ]\n }\n ]\n }\n ]\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://{base_url_domain}/api/global/v1/inventory/product-profiles/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Lightweight Parcel Products\",\n \"conditions\": {\n \"or\": [\n {\n \"and\": [\n {\n \"<=\": [\n {\n \"var\": \"weight\"\n },\n {\n \"value\": 15,\n \"unit\": \"lb\"\n }\n ]\n }\n ]\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{base_url_domain}/api/global/v1/inventory/product-profiles/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Lightweight Parcel Products\",\n \"conditions\": {\n \"or\": [\n {\n \"and\": [\n {\n \"<=\": [\n {\n \"var\": \"weight\"\n },\n {\n \"value\": 15,\n \"unit\": \"lb\"\n }\n ]\n }\n ]\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"errors": [
{
"type": "parameters",
"message": "The supplied parameters are invalid."
}
]
}{
"errors": [
{
"type": "not_found",
"message": "The server could not find the requested resource."
}
]
}{
"errors": [
{
"type": "unable_to_process",
"message": "Unknown condition field \"unknown_field\"."
}
]
}Authorizations
Generate a JWT access token through a Custom Global Integration and provide it with each request in the Authorization header prefixed with "Bearer" and then a single space.
Path Parameters
Product Profile ID.
x >= 126
Body
Human-readable Product Profile name.
1 - 255"Lightweight Parcel Products"
A one-level OR-of-AND condition tree. The server accepts the {"and": [...]} shorthand
for a single group and always returns the canonical {"or": [{"and": [...]}]} form.
OpenAPI validates the structural envelope. ShipStream remains authoritative for available
Product fields, field/operator compatibility, option values, measurement units, raw CEL
validity, normalization, the limit of 64 condition rows across all groups, and the
65,535-byte compiled-expression limit. Editor clients can
load the applicable Product field catalogue from
GET /api/global/v1/inventory/product-profiles/condition-fields or
GET /api/global/v1/inventory/handling-classes/condition-fields.
- Option 1
- Option 2
Show child attributes
Show child attributes
{
"or": [
{
"and": [
{
"<=": [
{ "var": "weight" },
{ "value": 15, "unit": "lb" }
]
}
]
}
]
}
Response
OK - The operation completed successfully and there is no response body.
Was this page helpful?